package com.xfashionbrand.models;

import com.android.volley.VolleyError;

import org.json.JSONObject;
import com.xfashionbrand.WordPress;
import com.xfashionbrand.datasets.AccountTable;
import com.xfashionbrand.util.AppLog;
import com.xfashionbrand.util.AppLog.T;

import java.util.Map;

import de.greenrobot.event.EventBus;

/**
 * Class for managing logged in user informations.
 */
public class Account extends AccountModel {

    public void signout() {
        init();
        save();
    }

    public void save() {
        AccountTable.save(this);
    }

    public enum RestParam {
        FIRST_NAME("first_name"),
        LAST_NAME("last_name"),
        DISPLAY_NAME("display_name"),
        ABOUT_ME("description");

        private String description;

        RestParam(String description) {
            this.description = description;
        }

        public static String toString(RestParam param) {
            return param.description;
        }
    }
}
